<?php
namespace app\news\controller;

class Index
{
    public function index()
    {
        echo "news";
    }

    public function retJson($code,$message = '',$data = array()){
    	if(!is_numeric($code)){
    		return '';
    	}

    	$result=array(
    		'code' => $code,
    		'message' => $message;
    		'data' => $data
    	);

    	echo json_encode($result);
    	exit;
    }
}
